Skip to content

Conversation

@gcs278
Copy link
Contributor

@gcs278 gcs278 commented Mar 17, 2022

Updates for fixing stale route status which is impacting various operations such as sharding and ingress operator status.

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Mar 17, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2022

@gcs278: This pull request references Bugzilla bug 1944851, which is invalid:

  • expected the bug to target the "4.11.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

[WIP] Bug 1944851: Clear route status when an ingress controller is deleted or a route is un-admitted

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot requested review from frobware and lmzuccarelli March 17, 2022 17:37
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 17, 2022
@gcs278 gcs278 force-pushed the BZ1944851-Clear-Route-Status branch 2 times, most recently from 1c2e6d1 to c5be3e1 Compare March 17, 2022 18:51
@gcs278
Copy link
Contributor Author

gcs278 commented Mar 17, 2022

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Mar 17, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2022

@gcs278: This pull request references Bugzilla bug 1944851, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.11.0) matches configured target release for branch (4.11.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @ShudiLi

Details

In response to this:

/bugzilla refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot requested a review from ShudiLi March 17, 2022 19:35
@gcs278 gcs278 force-pushed the BZ1944851-Clear-Route-Status branch 2 times, most recently from 71cf24c to 030f1b7 Compare March 17, 2022 22:19
@gcs278 gcs278 force-pushed the BZ1944851-Clear-Route-Status branch 3 times, most recently from bc489d1 to 237844e Compare March 21, 2022 20:52
@gcs278 gcs278 requested a review from Miciah March 21, 2022 21:03
@gcs278 gcs278 force-pushed the BZ1944851-Clear-Route-Status branch 4 times, most recently from 795bc0a to fd8de0d Compare March 25, 2022 21:10
Copy link
Contributor Author

@gcs278 gcs278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

… or a route is not admitted anymore.

 This change adds the responsibility of clearing route status to the ingress controller. There are two situations in
 which the ingress controller now updates route status:
    #1 When the ingress controller/router is deleted or killed
    openshift#2 When the ingress controller/router un-admits a route
 This also adds a new watch for router pods deleted so that the ingress controller can determine when to clear route
 status for #1.
 It also adds new status fields for RouteSelector and NamespaceSelector in order to determine when to clear route
 status for openshift#2.
@gcs278 gcs278 force-pushed the BZ1944851-Clear-Route-Status branch from df39af5 to 1852c35 Compare June 10, 2022 19:29
@gcs278
Copy link
Contributor Author

gcs278 commented Jun 13, 2022

Errors don't look related.
/retest

@gcs278
Copy link
Contributor Author

gcs278 commented Jun 13, 2022

/retest

2 similar comments
@gcs278
Copy link
Contributor Author

gcs278 commented Jun 14, 2022

/retest

@gcs278
Copy link
Contributor Author

gcs278 commented Jun 14, 2022

/retest

Comment on lines +169 to +176
for i := range routeList.Items {
route := &routeList.Items[i]

routeInShard := routeSelector.Matches(labels.Set(route.Labels))
namespaceInShard := namespacesInShard.Has(route.Namespace)

if !routeInShard || !namespaceInShard {
if cleared, err := r.clearRouteStatus(route, ingress.ObjectMeta.Name); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iterating over i isn't actually an optimization if we then copy to the route variable.

Suggested change
for i := range routeList.Items {
route := &routeList.Items[i]
routeInShard := routeSelector.Matches(labels.Set(route.Labels))
namespaceInShard := namespacesInShard.Has(route.Namespace)
if !routeInShard || !namespaceInShard {
if cleared, err := r.clearRouteStatus(route, ingress.ObjectMeta.Name); err != nil {
for i := range routeList.Items {
routeInShard := routeSelector.Matches(labels.Set(routeList.Items[i].Labels))
namespaceInShard := namespacesInShard.Has(routeList.Items[i].Namespace)
if !routeInShard || !namespaceInShard {
if cleared, err := r.clearRouteStatus(&routeList.Items[i], ingress.ObjectMeta.Name); err != nil {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, route is a pointer value, so the code you have isn't doing a copy.

@Miciah
Copy link
Contributor

Miciah commented Jun 17, 2022

Lovely jubbly!
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 17, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 17, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gcs278, Miciah

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gcs278
Copy link
Contributor Author

gcs278 commented Jun 17, 2022

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 17, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 99beb07 and 8 for PR HEAD 1852c35 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 99beb07 and 7 for PR HEAD 1852c35 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 99beb07 and 6 for PR HEAD 1852c35 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD a1bb923 and 5 for PR HEAD 1852c35 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD a1bb923 and 4 for PR HEAD 1852c35 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a1bb923 and 3 for PR HEAD 1852c35 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 22, 2022

@gcs278: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-ci openshift-ci bot merged commit 7dc3f4d into openshift:master Jun 22, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 22, 2022

@gcs278: All pull requests linked via external trackers have merged:

Bugzilla bug 1944851 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1944851: Clear route status when an ingress controller is deleted or a route is un-admitted

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants